﻿using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace Smart.Hotfix
{
    [ObjectSystem]
    public class AnalasisComponentAwakeSystem : AwakeSystem<AnalasisComponent>
    {
        public override void Awake(AnalasisComponent self)
        {
            self.Awake();
        }
    }

    [ObjectSystem]
    public class AnalasisComponentStartSystem : StartSystem<AnalasisComponent>
    {
        public override void Start(AnalasisComponent self)
        {
            self.Start();
        }
    }

    [ObjectSystem]
    public class AnalasisComponentUpdateSystem : UpdateSystem<AnalasisComponent>
    {
        public new void Run(object self)
        {
            if (self is AnalasisComponent component)
            {
                component.Update();
            }
        }
    }

    [ObjectSystem]
    public class AnalasisComponentLateUpdateSystem : LateUpdateSystem<AnalasisComponent>
    {
        public new void Run(object o)
        {
            if (o is AnalasisComponent component)
            {
                component.LateUpdate();
            }
        }
    }

    public class AnalasisComponent : Component,IComponentUpdate,IComponentLateUpdate
    {
        public void Awake()
        {
            //Logger.Log("FrameComponent Awake");
        }

        public void Start()
        {
            //Logger.Log("FrameComponent Start");
        }

        public void Update()
        {
            //Logger.Log("FrameComponent Update");
        }

        public void LateUpdate()
        {
            //Logger.Log("FrameComponent LateUpdate");
        }

        public override void Dispose()
        {
            if (Disposed)
            {
                return;
            }

            base.Dispose();
        }
    }
}